<style>
    .mf-td-split{display: inline-block !important;}
    .mf-td-title{font-weight: bold;}
</style>
<form id="edit-form-follow" class="form-horizontal mf-form" role="form" data-toggle="validator" method="POST" action="">
    <script>var customer_id=<?= $customer_id?>;</script>
    <div>
        <ul class="nav nav-tabs" role="tablist">
            <li role="presentation" class="active">
                <a href="#home" aria-controls="home" role="tab" data-toggle="tab">客户信息</a>
            </li>
            <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">报备申请</a></li>
        </ul>

        <!-- Tab panes -->
        <div class="tab-content">
            <div role="tabpanel" class="tab-pane active" id="home">
                <div class="container">
                    <div class="row">
                        <div class="col col-xs-7">
                            <table class="table table-borderd">
                                <tr>
                                    <td class="mf-td-title" style="width:100px">{:__('Customer_name')}:</td>
                                    <td class="mf-td-input">{$row.customer_name|htmlentities}</td>
                                    <td class="mf-td-title" style="width:120px">{:__('Customer_tel')}:</td>
                                    <td class="mf-td-input">{$row.customer_tel|htmlentities}</td>
                                </tr>
                                <tr>
                                    <td class="mf-td-title" style="width:100px">客户号码2:</td>
                                    <td class="mf-td-input" id="tdTel2">{$row.customer_tel2|htmlentities}</td>
                                    <td class="mf-td-title" style="width:120px">客户号码3:</td>
                                    <td class="mf-td-input" id="tdTel3">{$row.customer_tel3|htmlentities}</td>
                                </tr>
                                <tr>
                                    <td class="mf-td-title">{:__('Sex_radio')}:</td><td class="mf-td-input"> 
                                        <div class="radio">
                                            {$row.sex_radio}
                                        </div>
                                    </td>
                                    <td class="mf-td-title">{:__('Want_area')}:</td>
                                    <td class="mf-td-input" style="position:relative">{$row.want_area|htmlentities}</td>
                                </tr>
                                <tr>
                                    <td class="mf-td-title">{:__('First_house')}:</td>
                                    <td class="mf-td-input"> 
                                        <div>
                                        {$row.first_house}
                                        </div>
                                    </td>
                                    <td class="mf-td-title">{:__('Social_security')}:</td><td class="mf-td-input">{$row.social_security}</td>
                                </tr>
                                <tr>
                                    <td class="mf-td-title">{:__('Payment_percentage')}:</td>
                                    <td class="mf-td-input">{$row.payment_percentage|htmlentities}%</td>
                                    <td class="mf-td-title">{:__('Payment_method')}:</td>
                                    <td class="mf-td-input">
                                        <div>
                                            {$row.payment_method}
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="mf-td-title">面积(平方米):</td>
                                    <td class="mf-td-input">
                                        <div class="input-group">
                                            <div class="mf-td-split">{$row.want_acre_low|htmlentities}</div>
                                            <div class="mf-td-split">至</div>
                                            <div class="mf-td-split">{$row.want_acre_high|htmlentities}</div>
                                        </div>
                                    </td>
                                    <td class="mf-td-title">期望总价(万元):</td>
                                    <td class="mf-td-input">
                                        <div class="input-group">
                                            <div class="mf-td-split">{$row.want_price_low|htmlentities}</div> 
                                            <div class="mf-td-split">至</div>
                                            <div class="mf-td-split">{$row.want_price_high|htmlentities}</div>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="mf-td-title">期望楼层:</td>
                                    <td class="mf-td-input">
                                        <div class="input-group">
                                            <div class="mf-td-split">{$row.want_floor_low}</div>
                                            <div class="mf-td-split">至</div>
                                            <div class="mf-td-split"> {$row.want_floor_high}</div>
                                        </div>
                                    </td>
                                    <td class="mf-td-title">客户来源:</td>
                                    <td>{$row.customer_from}</td>
                                </tr>
                                <tr>
                                    <td class="mf-td-title">{:__('Property_quantity')}:</td>
                                    <td class="mf-td-input">{$row.property_quantity}</td>
                                    <td class="mf-td-title">{:__('Marriage_radio')}:</td>
                                    <td class="mf-td-input">
                                            {$row.marriage_radio}
                                    </td>
                                </tr>
                                <tr>
                                    <td class="mf-td-title">{:__('Mem')}:</td>
                                    <td class="mf-td-input" colspan="3"> {$row.mem}</td>
                                </tr>
                                <tr>
                                    <td class="mf-td-title">报备楼盘:</td>
                                    <td class="mf-td-input" colspan="3"> 
                                        {foreach name="buildings" item="vo" }
                                        <div class="mf-td-split"> {$vo.building_name} , </div>
                                        {/foreach}
                                    </td>
                                </tr>
                                <tr>
                                    <td class="mf-td-title">{:__('Account_statement')}:</td>
                                    <td class="mf-td-input" colspan="3"> {$row.account_statement}</td>
                                </tr>
                                <tr>
                                    <td class="mf-td-title">{:__('Credit_investigation')}:</td>
                                    <td class="mf-td-input" colspan="3"> {$row.credit_investigation}</td>
                                </tr>
                            </table>
                        </div>
                        <div class="col col-xs-5">
                            <div class="panel panel-success">
                                <div class="panel-heading">跟进记录</div>
                                <div class="panel-body" style="overflow: hidden">
                                    <div class="container-fluid no-margin no-padding hide" id="ulFollow" >
                                        <ul class="list-group" >
                                            {volist name="follow_list" id="vo"}
                                                <li  class="list-group-item">[{:date('Y-m-d H:i:s',$vo.create_time)}][{$vo.state}][{$vo.newhouseadmin.nickname}]{$vo.follow_content}</li>
                                            {/volist}
                                        </ul>
                                        <div class="row">
                                            <div class="col col-xs-6">
                                                <button class="form-control btn btn-default margin" id="btnFollowAddState">跟进状态</button>
                                            </div>
                                            <div class="col col-xs-6">
                                                <button class="form-control btn btn-primary margin" id="btnFollowAddMobile">跟进号码</button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                
            </div>
            <div role="tabpanel" class="tab-pane" id="profile">
                <div class="panel panel-success">
                    <div class="panel-body" style="height:360px;overflow-y: scroll">
                        <div class="container-fluid no-margin no-padding">
                            <div class="row">
                                <div class="col col-xs-8">
                                    <div class="panel panel-default">
                                        <div class="panel-heading">
                                            <h3 class="panel-title">申请记录</h3>
                                        </div>
                                        <div class="panel-body">
                                            <table class="table table-bordered" id="tblBuildings">
                                                <tr><th>报备楼盘</th><th>申请时间</th><th>审核状态</th><th>审核人</th><th>审核说明</th></tr>    
                                                {volist name="report_list" id="vo"}
                                                    <tr>
                                                        <td>{$vo.newhousebuilding.building_name}</td>
                                                        <td>{:date('Y-m-d',$vo.createtime)}</td>
                                                        <td>{$vo.verify_state}</td>
                                                        <td>{$vo.newhouseverifyadmin.nickname}</td>
                                                        <td>{$vo.verify_mem}</td>
                                                    </tr>
                                                {/volist}
                                            </table>
                                        </div>
                                    </div>
                                </div>
                                <div class="col col-xs-4">
                                    <div class="panel panel-success">
                                        <div class="panel-heading">
                                            <h3 class="panel-title">报备申请</h3>
                                        </div>
                                        <div class="panel-body">
                                            <div class="form-group">
                                                <label for="c-building_id" class="col-xs-4 control-label">报备楼盘</label>
                                                <div class="col-xs-8">
                                                    <input id="c-building_id" data-multiple="false" data-source="newhouse/building/items/index" 
                                                    data-primary-key="id" data-field="building_name" class="form-control selectpage" name="row[building_id]" type="text">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="c-prepare_visit" class="col-xs-4 control-label">预计看房</label>
                                                <input type="text" id="c-prepare_visit" placeholder="预计看房时间" style="width:92%" class="form-control datetimepicker margin" />
                                            </div>
                                            <div class="form-group">
                                                <label for="report-contents" class="col-xs-4 control-label">报备说明</label>
                                                <textarea class="form-control margin" style="width:92%" id="report-contents"></textarea>
                                            </div>
                                            <div class="form-group">
                                                <div class="col-xs-12">
                                                    <button type="button" id="btnReportAdd" class="btn btn-primary form-control">报备</button>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>